<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">

<section class="content-header">
    <h1>日志列表</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" onsubmit="return false;">
                        <div class="row">
                            <div class="form-inline">
                                <div class="form-group">
                                    <label>用户名</label>
                                    <input type="text" name="account" class="form-control" placeholder="请输入用户名">
                                </div>
                                <div class="form-group">
                                    <label>内容</label>
                                    <input type="text" name="title" class="form-control" placeholder="请输入查询内容">
                                </div>
                                <div class="form-group">
                                    <label>时间</label>
                                    <input type="text" class="form-control datepicker" name="startTime"
                                           readonly="readonly"/>
                                    <span>至</span>
                                    <input type="text" class="form-control datepicker" name="endTime"
                                           readonly="readonly"/>
                                </div>
                                <button id="btn-search" type="button" class="btn btn-success" onclick="js.table.search(table)">
                                    <span class="Bold">搜索</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">

    var table;

    $(function () {

        table = js.table.init({
            url: ctx + "sys/log/list",
            showExport: false,
            columns: [
                {
                    title: '序号', field: 'id', width: '40',
                    formatter: function (value, row, index, field) {
                        return index + 1;
                    }
                },
                {title: "帐号", field: 'account'},
                {title: "用户名", field: 'name'},
                {title: "操作名称", field: 'operationName'},
                {title: "操作内容", field: 'operationContent', width: '550'},
                {title: "操作时间", field: 'operationTime', width: '150'},
                {title: "IP地址", field: 'address', width: '150'}
            ]
        });

    });

</script>

</body>
</html>
